const path = require('path');
const express = require('express');

let app = express();

//构建
const SchoolRouter = express.Router();

//引入控制器
const SchoolController = require(path.join(__dirname,"../controllers/SchoolController"));

//班级列表页面
SchoolRouter.get('/schoolList',SchoolController.schoolList);

//班级添加页面
SchoolRouter.get('/schoolAdd',SchoolController.schoolAdd);

//班级添加post处理
SchoolRouter.post('/schoolAdd',SchoolController.schoolAddForm);

//班级编辑页面
SchoolRouter.get('/schoolEdit',SchoolController.schoolEdit);

//班级编辑post处理
SchoolRouter.post('/schoolEdit',SchoolController.schoolEditForm);

//班级删除
SchoolRouter.get('/schoolDelete',SchoolController.schoolDelete);

module.exports = SchoolRouter;